import {createWebHashHistory, createRouter} from "vue-router";

const routes = [
    {
        path: '/',
        redirect: '/index'
    },
    {
        path: '/login',
        name: 'Login',
        component: () => import('../Login.vue')
    },
    {
        path: '/index',
        name: 'Index',
        component: () => import('../views/index.vue')
    },
    {
        path: '/ds',
        component: () => import('../Layout.vue'),
        redirect: '/ds/pcenter',
        children: [
            {
                path: '/ds/pcenter',
                name: 'PersonCenter',
                component: () => import('../views/pcenter/index.vue'),
            },
            {
                path: '/ds/sci-hot',
                name: 'ScientificHot',
                component: () => import('../views/sci-hot/index.vue'),
            },
            {
                path: '/ds/ai-search',
                name: 'AiSearch',
                component: () => import('../views/ai-search/index.vue'),
            }
        ]
    },
]
const router = createRouter({
    history: createWebHashHistory(),
    routes,
})
export default router
